package com.cecdat;

import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import com.cecdat.common.config.* ;
import java.util.Date;


@SpringBootApplication
@MapperScan(value = "com.cecdat.*.mapper")
@EnableSwagger2
@RestController
@EnableConfigurationProperties(value = SystemProperties.class)
public class CecDataSensationApplication {

    public static void main(String[] args) {
        SpringApplication.run(CecDataSensationApplication.class, args);
    }


    @GetMapping(path = "/api/get-date")
    public Date getData(){
        return new Date() ;
    }


    @Bean
    public LogicSqlInjector createLogicSqlIntercepter(){
        return new LogicSqlInjector() ;
    }


}
